package hello.there;

import inf102.assignment2.filters.FilterableImage;
import inf102.assignment2.plugins.FilterPlugIn;

public class MorePlugIns {
	
	@FilterPlugIn(name = "MorePlugIns filter1")
	public void filter1(FilterableImage image){
		int[][] pixels = image.getPixels();
		
		for (int x = 0; x < image.getWidth() / 2; x++)
		{
			for (int y = 0; y < image.getHeight(); y++)
			{
				int temp = pixels[x][y];
				pixels[x][y] = pixels[image.getWidth() - x - 1][y];
				pixels[image.getWidth() - x - 1][y] = temp;
			}
		}
	}
	
	@FilterPlugIn(name = "MorePlugIns filter2")
	public void filter2(FilterableImage image){
		int[][] pixels = image.getPixels();
		
		for (int x = 0; x < image.getWidth() / 2; x++)
		{
			for (int y = 0; y < image.getHeight(); y++)
			{
				int temp = pixels[x][y];
				pixels[x][y] = pixels[image.getWidth() - x - 1][y];
				pixels[image.getWidth() - x - 1][y] = temp;
			}
		}
	}
	
	@FilterPlugIn(name = "MorePlugIns filter3")
	public void filter3(FilterableImage image){
		int[][] pixels = image.getPixels();
		
		for (int x = 0; x < image.getWidth() / 2; x++)
		{
			for (int y = 0; y < image.getHeight(); y++)
			{
				int temp = pixels[x][y];
				pixels[x][y] = pixels[image.getWidth() - x - 1][y];
				pixels[image.getWidth() - x - 1][y] = temp;
			}
		}
	}
}
